package com.bw.usercenter.model.api

import com.bw.net.protocol.resp.BaseRespEntity
import com.bw.usercenter.model.protocol.req.UserEntitiy
import com.bw.usercenter.model.protocol.resp.*
import io.reactivex.Observable
import retrofit2.http.*

interface UserCenterApi {

    @POST("api/User/register")
    fun register(@Body param:UserEntitiy):Observable<BaseRespEntity<RespUserEntity>>

    @POST("api/User/login")
    fun login(@Body param: UserEntitiy):Observable<BaseRespEntity<RespUserEntity>>
    //请求推荐商品
    @GET("api/GoodsType/getRecommendTypes")
    fun getRecomment():Observable<RespRecommendEntity>
    @GET()
    fun requestTB(@Url url: String):Observable<RespGoodEntity>
    //获取验证码
    @GET("api/User/authcode")
    fun authcode():Observable<Int>
    //搜索商品
    @GET()
    fun getSearch(@Url url:String):Observable<RespSearchEntity>
    //ID搜索商品
    @GET("api/Goods/getGoodsDetailInfo?")
    fun getSearchitemID(@Query("ids") string: String):Observable<RespSearchitemIDEntity>

}